package com.augmentum.springcloudproductservice.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
public class ProductException extends RuntimeException {
    private Integer code;
    private List<String> params;

    public ProductException(Integer code) {
        this.code = code;
    }

    public ProductException(Integer code, List<String> params) {
        this.code = code;
        this.params = params;
    }

    public ProductException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }

    public ProductException(Throwable t) {
        super(t);
    }
}
